import axios from '@/utils/request'

// 登录接口
export const login = data => {
  return axios.post('/user/login', data)
}

// 关闭提醒
export const closeRemind = (id, uuid) => {
  return axios.get(`/remindItem/close/${id}?uuid=${uuid}`)
}

// 获取单个提醒
export const getRemind = id => {
  return axios.get(`/remindItem/get/${id}`)
}

// 分页获取提醒事项
export const pageRemind = (page, size) => {
  return axios.post(`/remindItem/page/${page}/${size}`)
}

// 添加提醒事项
export const addRemind = remind => {
  return axios.post('/remindItem/add', remind)
}

// 更新提醒事项
export const updateRemind = (id, remind) => {
  return axios.post(`/remindItem/update/${id}`, remind)
}

// 逻辑删除/恢复提醒事项
export const delFlagRemind = (id, flag) => {
  return axios.post(`/remindItem/delFlag/${id}/${flag}`)
}

// 物理删除提醒事项
export const delRemind = id => {
  return axios.post(`/remindItem/del/${id}`)
}
